Skip to content

Conversation

@miguelafsilva5
Copy link
Member

PR Description

The mpu_find_region_base and mpu_find_region_exact on arm-r MPU driver were failing to find some regions that had the same base. These function only checked the first region that matched the base. Furthermore, they didn't validate that the region belong to the address space using the mpu update or unmap.

This PR fixes this problem by merging both function in one and adding a check to the asid owner of each region. This solves the problem because the vmpu driver ensures that there is only a single region with the same base per AS.

Another function was removed because is was a single if statement and it was being used only once throughout the code.

Make MPU region lookups ASID-aware to avoid cross-address-space matches,
and merge the two find helpers into a single
mpu_find_region(struct mp_region*, asid_t) that matches by base and ASID.

Signed-off-by: Miguel Silva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants